import request from '@/utils/request'

// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/cms/user/index',
    method: 'get'
  })
}

// 更新用户资料
export function updateUserProfile(data) {
  return request({
    url: '/cms/user/profile',
    method: 'post',
    data
  })
}

// 退出登录
export function logout() {
  return request({
    url: '/cms/user/logout',
    method: 'get'
  })
}

// 更新用户头像
export function updateAvatar(data) {
  return request({
    url: '/cms/user/avatar',
    method: 'post',
    data
  })
}

// 获取指定用户信息
export function getSpecificUserInfo(data) {
  return request({
    url: '/cms/user/userInfo',
    method: 'post',
    data
  })
}

// 获取签到状态
export function getUserSigned(data) {
  return request({
    url: '/cms/user/getSigned',
    method: 'post',
    data
  })
}